﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="TEST.aspx.cs" Inherits="TEST" %>
<%@ Register Src="~/UserControls/ucHtmlEditor.ascx" TagPrefix="uc1" TagName="ucHtmlEditor" %>



<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="FeaturedContent" Runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" Runat="Server">
    <script src="../../Scripts/GridDataBind.js"></script>
  
    <script src="../../Scripts/scroll.js"></script>
    
 <input type="button" onclick="TextSelected();" value="Is some text selected" />
<input type="button" onclick="SelectedTextNodes();" value="Show selected Text Nodes" />
    <uc1:ucHtmlEditor runat="server" ID="ucHtmlEditor" />

    <script type="text/javascript">

        
        function SelectedTextNodes() {
            var nodes = oboutGetEditor('editor').SelectedTextNodes();
            var output = "Selected Text Nodes content:\n\n";

            for (var i = 0; i < nodes.length; i++) output += "[" + nodes[i].data + "]\n";
            alert(output);
        }

        function TextSelected() {
            alert($find("<%= ucHtmlEditor.editor_ID %>"));
            var editPanel = $find("<%= ucHtmlEditor.editor_ID %>").get_editPanel();
            editPanel
            alert(editPanel);
        }
    </script>
</asp:Content>

